package biz.ezcom.design.pattern.state;

/**
 * 下午时的状态类
 */
public class StateAfternoon implements State {

	@Override
	public void handle(Context context) {
		int hour = context.getHour();
		if(hour > 12 && hour <= 18){
			System.out.println(hour + "：下午上班想睡觉");
		}else{
			context.setState(new StateEvening());
			context.request();
		}
	}

}
